<html>
<head><meta charset="utf-8"><title>substs of Unevaluated consts · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html">substs of Unevaluated consts</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="198068394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198068394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198068394">(May 19 2020 at 13:52)</a>:</h4>
<p>Currently trying to fix <a href="https://github.com/rust-lang/rust/issues/72129#issuecomment-627181925">https://github.com/rust-lang/rust/issues/72129#issuecomment-627181925</a></p>
<div class="codehilite"><pre><span></span><code>// run-pass
#![feature(const_generics)]
#![allow(incomplete_features, unused_braces)]

trait Bar&lt;T&gt; {}
impl&lt;T&gt; Bar&lt;T&gt; for [u8; {7}] {}

struct Foo&lt;const N: usize&gt; {}
impl&lt;const N: usize&gt; Foo&lt;N&gt;
where
    [u8; N]: Bar&lt;[(); N]&gt;,
{
    fn foo() {}
}

fn main() {
    Foo::foo();
}
</code></pre></div>



<a name="198068721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198068721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198068721">(May 19 2020 at 13:54)</a>:</h4>
<p>While type checking main, we end up equating <code>Equate.tys([(); ConstVar(_#0c)], TyVar _#1t)</code></p>



<a name="198068807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198068807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198068807">(May 19 2020 at 13:55)</a>:</h4>
<p>This means that we instantiante <code>TyVar(_#1t)</code> as <code>[(); ConstVar(_#0c)]</code></p>



<a name="198068980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198068980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198068980">(May 19 2020 at 13:56)</a>:</h4>
<p>To do so, we generalize <code>[(); ConstVar(_#0c)]</code>, which causes a problem, as <code>ConstVar(_#0c)</code> is already known as <code>Const { ty: usize, val: Unevaluated(DefId(0:7 ~ issue_69654_run_pass[317d]::{{impl}}[0]::{{constant}}[0]), [TyVar(_#1t)], None) }</code></p>



<a name="198069140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198069140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198069140">(May 19 2020 at 13:57)</a>:</h4>
<p>We therefore store <code>TyVar(_#1t) := Const { ty: usize, val: Unevaluated(DefId(0:7 ~ issue_69654_run_pass[317d]::{{impl}}[0]::{{constant}}[0]), [TyVar(_#1t)], None) }</code> in the unification table, causing a stack overflow when trying to resolve this later on.</p>



<a name="198070303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198070303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198070303">(May 19 2020 at 14:05)</a>:</h4>
<p>I realized I don't even have a clear question to ask here <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> Both helpful and unhelpful suggestions are always welcome though.</p>



<a name="198077176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198077176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198077176">(May 19 2020 at 14:50)</a>:</h4>
<p>Opened <a href="https://github.com/rust-lang/rust/pull/72351/">https://github.com/rust-lang/rust/pull/72351/</a> for now</p>



<a name="198106569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198106569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198106569">(May 19 2020 at 18:17)</a>:</h4>
<p>I think I now understand the problem here, <a href="https://github.com/rust-lang/rust/issues/72351">#72351</a> is incorrect afaict.</p>



<a name="198106806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198106806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198106806">(May 19 2020 at 18:19)</a>:</h4>
<p>Due to lazy normalization <code>{7}</code> remains as <code>ConstKind::Unevaluated</code> and has <code>T</code> as a subst as it should be able to use <code>T</code> in the future, lets say for</p>
<div class="codehilite"><pre><span></span><code><span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Bar</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">[</span><span class="kt">u8</span><span class="p">;</span><span class="w"> </span><span class="n">std</span>::<span class="n">mem</span>::<span class="n">size_of</span>::<span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()]</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="198107066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107066">(May 19 2020 at 18:21)</a>:</h4>
<p>During type inference, we assemble the candidates for <code>Foo::foo</code>.<br>
Inside of <code>assemble_candidates_from_impl</code> we find an impl of <code>foo</code> and have to to satisfy the where clause <code>[u8; N]: Bar&lt;[(); N]&gt;,</code>.</p>



<a name="198107187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107187">(May 19 2020 at 18:23)</a>:</h4>
<p>We then first unify <code>[u8; N]</code> with <code>[u8; {7}]</code> =&gt; <code>N == {7}</code>.</p>



<a name="198107222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107222">(May 19 2020 at 18:23)</a>:</h4>
<p>This means <code>N</code> now has <code>T</code> in its subst.</p>



<a name="198107320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107320">(May 19 2020 at 18:24)</a>:</h4>
<p>When we now unify <code>Bar&lt;T&gt;</code> with <code>Bar[(); N]</code> we set <code>T == [(); N]</code>. Which means <code>T</code> now contains itself as a substitution.</p>



<a name="198107382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107382">(May 19 2020 at 18:25)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="121053">@varkor</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> Do you understand this explanation/does this makes sense to you?</p>



<a name="198107397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198107397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198107397">(May 19 2020 at 18:25)</a>:</h4>
<p>And if so, how could we proceed here?</p>



<a name="198112256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198112256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198112256">(May 19 2020 at 19:05)</a>:</h4>
<p>I'll try to read and reply later this evening.</p>



<a name="198140494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198140494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198140494">(May 19 2020 at 23:36)</a>:</h4>
<p>Hmm I am I think too tired to give useful feedback here as well :)</p>



<a name="198163517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/198163517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#198163517">(May 20 2020 at 07:35)</a>:</h4>
<p>I managed a slightly more minimal repro which still causes a stack overflow:</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#![feature(const_generics)]</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Const</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Const</span><span class="o">&lt;</span><span class="p">{</span><span class="w"> </span><span class="mi">6</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">}</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="c1">//                                  ^ ConstKind::Unevaluated with substs [N]</span>

<span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">M</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">Const</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span>: <span class="nc">A</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">foo</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="c1">// We must satisfy `Const&lt;M&gt;: A&lt;M&gt;` here.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// This has an impl candidate with `Const&lt;{ 6 + 1 }&gt;: A&lt;N&gt;`.</span>
<span class="w">    </span><span class="c1">// We now equate the `TraitRef`s `Const&lt;M&gt;: A&lt;M&gt;` with `Const&lt;{ 6 + 1 }&gt;: A&lt;N&gt;`.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// `Const&lt;M&gt; == Const&lt;{ 6 + 1 }&gt;` results in `M == ConstKind::Unevaluated with substs [N]`.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// `A&lt;M&gt; == A&lt;N&gt;` =&gt; `M == N` =&gt; `N == ConstKind::Unevaluated with substs [N]`</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201618747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201618747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201618747">(Jun 22 2020 at 15:17)</a>:</h4>
<p>Also relevant here is</p>
<div class="codehilite"><pre><span></span><code><span class="c1">// check-pass</span>
<span class="cp">#![feature(const_generics)]</span><span class="w"></span>
<span class="cp">#![allow(incomplete_features)]</span><span class="w"></span>

<span class="k">const</span><span class="w"> </span><span class="n">LEN</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">1024</span><span class="p">;</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">V</span><span class="o">&lt;</span><span class="n">T</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="kt">u32</span><span class="p">;</span><span class="w"> </span><span class="n">LEN</span><span class="p">]</span><span class="o">&gt;</span><span class="p">(</span><span class="n">T</span><span class="p">);</span><span class="w"> </span><span class="c1">// This cause an ICE.</span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span>: <span class="nc">V</span><span class="p">;</span><span class="w"> </span><span class="c1">// More accurately this use causes an ICE.</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201618854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201618854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201618854">(Jun 22 2020 at 15:18)</a>:</h4>
<p>With lazy norm, LEN is <code>ConstKind::Unevaluated(..., substs = [T])</code> which causes an ICE</p>



<a name="201619302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201619302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201619302">(Jun 22 2020 at 15:21)</a>:</h4>
<p>which is the same reason this has a cycle error</p>
<div class="codehilite"><pre><span></span><code><span class="cp">#![feature(const_generics)]</span><span class="w"></span>

<span class="k">const</span><span class="w"> </span><span class="n">LEN</span>: <span class="kt">usize</span> <span class="o">=</span><span class="w"> </span><span class="mi">1024</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">hoge</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">T</span>: <span class="p">[</span><span class="kt">u32</span><span class="p">;</span><span class="w"> </span><span class="n">LEN</span><span class="p">]</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="201620514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201620514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201620514">(Jun 22 2020 at 15:29)</a>:</h4>
<p>so... lazy normalization isn't actually normalizing when needed?</p>



<a name="201620612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201620612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201620612">(Jun 22 2020 at 15:30)</a>:</h4>
<p>IMO the problem is generic params should not contain itself as a subst</p>



<a name="201620667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201620667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201620667">(Jun 22 2020 at 15:30)</a>:</h4>
<p>So I think it is fine for <code>LEN</code> to remain unnormalized</p>



<a name="201620714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201620714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201620714">(Jun 22 2020 at 15:31)</a>:</h4>
<p>but it shouldn't have access to its parent subst</p>



<a name="201620790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201620790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201620790">(Jun 22 2020 at 15:31)</a>:</h4>
<p>But I am not completely sure about that and have to look at how this is done for types</p>



<a name="201629867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201629867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201629867">(Jun 22 2020 at 16:38)</a>:</h4>
<p>Ok, so afaict it's just not possible to have a default type with substs <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="201629945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201629945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201629945">(Jun 22 2020 at 16:39)</a>:</h4>
<p>*problematic substs</p>



<a name="201633404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633404">(Jun 22 2020 at 17:06)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> <span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> looking at the three above examples, I think the "easiest" solution for this mess is to stop using the parent generics in <code>AnonConst</code>s and instead use some kind of visitor to only include the relevant parameters in the substs.</p>
<p>I am not exactly sure how well this works and there are probably a lot of complications I did not think of yet. Do you think this is feasable/useful?</p>



<a name="201633636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633636">(Jun 22 2020 at 17:08)</a>:</h4>
<p>/me takes a peek and starts screaming</p>



<a name="201633652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633652">(Jun 22 2020 at 17:08)</a>:</h4>
<p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>



<a name="201633662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633662">(Jun 22 2020 at 17:08)</a>:</h4>
<p>let me join</p>



<a name="201633689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633689">(Jun 22 2020 at 17:09)</a>:</h4>
<p>this basically the same thing as the hack we use to ban type parameter defaults from seeing type parameters <em>after</em> them as being in scope</p>



<a name="201633731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633731">(Jun 22 2020 at 17:09)</a>:</h4>
<p>type parameters work during resolution</p>



<a name="201633735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633735">(Jun 22 2020 at 17:09)</a>:</h4>
<p>for <code>const X: [u8; LEN]</code> - the fix is easy, just don't have generics in scope at all. we don't support them</p>



<a name="201633753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633753">(Jun 22 2020 at 17:09)</a>:</h4>
<p>for type parameter defaults, it's worse</p>



<a name="201633838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633838">(Jun 22 2020 at 17:10)</a>:</h4>
<p>basically we allow <code>struct Foo&lt;A, B = A&gt;(...);</code> but not <code>&lt;A = B, B&gt;</code></p>



<a name="201633849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633849">(Jun 22 2020 at 17:10)</a>:</h4>
<p>jup</p>



<a name="201633858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633858">(Jun 22 2020 at 17:10)</a>:</h4>
<p>but that's done <del>syntactically</del> (well, at name resolution time)</p>



<a name="201633867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633867">(Jun 22 2020 at 17:10)</a>:</h4>
<p>(deleted)</p>



<a name="201633876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633876">(Jun 22 2020 at 17:10)</a>:</h4>
<p>and there is no equivalent in the parent generics system</p>



<a name="201633964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633964">(Jun 22 2020 at 17:11)</a>:</h4>
<p>just ban const expressions in type param defaults from using <em>any</em> generics in scope</p>



<a name="201633969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201633969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201633969">(Jun 22 2020 at 17:11)</a>:</h4>
<p>I guess?</p>



<a name="201634028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634028">(Jun 22 2020 at 17:12)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="cp">#![feature(const_generics)]</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Const</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">N</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="w"> </span><span class="n">A</span><span class="o">&lt;</span><span class="n">N</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Const</span><span class="o">&lt;</span><span class="p">{</span><span class="w"> </span><span class="mi">6</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="p">}</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="c1">//                                  ^ ConstKind::Unevaluated with substs [N]</span>

<span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">M</span>: <span class="kt">usize</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">Const</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span>: <span class="nc">A</span><span class="o">&lt;</span><span class="n">M</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">foo</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="c1">// We must satisfy `Const&lt;M&gt;: A&lt;M&gt;` here.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// This has an impl candidate with `Const&lt;{ 6 + 1 }&gt;: A&lt;N&gt;`.</span>
<span class="w">    </span><span class="c1">// We now equate the `TraitRef`s `Const&lt;M&gt;: A&lt;M&gt;` with `Const&lt;{ 6 + 1 }&gt;: A&lt;N&gt;`.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// `Const&lt;M&gt; == Const&lt;{ 6 + 1 }&gt;` results in `M == ConstKind::Unevaluated with substs [N]`.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// `A&lt;M&gt; == A&lt;N&gt;` =&gt; `M == N` =&gt; `N == ConstKind::Unevaluated with substs [N]`</span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="201634048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634048">(Jun 22 2020 at 17:12)</a>:</h4>
<p>then you can do the same treatment as in types of const params</p>



<a name="201634075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634075">(Jun 22 2020 at 17:12)</a>:</h4>
<p>doesn't fix that though</p>



<a name="201634102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634102">(Jun 22 2020 at 17:12)</a>:</h4>
<p>I think that one is fine</p>



<a name="201634138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634138">(Jun 22 2020 at 17:12)</a>:</h4>
<p>in that it's one of the situations that requires lazy normalization to work</p>



<a name="201634162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634162">(Jun 22 2020 at 17:12)</a>:</h4>
<p>we already have lazy norm</p>



<a name="201634185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634185">(Jun 22 2020 at 17:13)</a>:</h4>
<p>maybe it's not lazy enough :P</p>



<a name="201634207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634207">(Jun 22 2020 at 17:13)</a>:</h4>
<p>both <code>impl</code> headers and <code>where</code> clauses are the problem situations</p>



<a name="201634248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634248">(Jun 22 2020 at 17:13)</a>:</h4>
<p>there were aspects skinny121 was going to address after the initial PRs, that they never got to: perhaps that's one of the situations</p>



<a name="201634339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634339">(Jun 22 2020 at 17:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/substs.20of.20Unevaluated.20consts/near/201634185">said</a>:</p>
<blockquote>
<p>maybe it's not lazy enough :P</p>
</blockquote>
<p>{ 6 + 1 } now remains  <code>ConstKind::Unevaluated</code></p>



<a name="201634341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634341">(Jun 22 2020 at 17:14)</a>:</h4>
<p>the explanation doesn't entirely track: miri is designed to allow evaluating that with arbitrary substs since <code>N</code> isn't used in the expression</p>



<a name="201634356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634356">(Jun 22 2020 at 17:14)</a>:</h4>
<p>okay maybe it's <em>too</em> lazy</p>



<a name="201634369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634369">(Jun 22 2020 at 17:14)</a>:</h4>
<p>but an on-demand normalization would succeed</p>



<a name="201634374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634374">(Jun 22 2020 at 17:14)</a>:</h4>
<p>no matter the substs</p>



<a name="201634387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634387">(Jun 22 2020 at 17:14)</a>:</h4>
<p>maybe something checks that the substs are concrete? that would be wrong</p>



<a name="201634420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634420">(Jun 22 2020 at 17:15)</a>:</h4>
<p>(again, the system is designed for polymorphic evaluation)</p>



<a name="201634514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634514">(Jun 22 2020 at 17:15)</a>:</h4>
<p>The above example fails because an infer var references itself</p>



<a name="201634521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634521">(Jun 22 2020 at 17:15)</a>:</h4>
<p>this is different from the situation with types inside either const param types or type param defaults, which can cause some unfortunate cycles</p>



<a name="201634542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634542">(Jun 22 2020 at 17:15)</a>:</h4>
<p>ah lol</p>



<a name="201634609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634609">(Jun 22 2020 at 17:16)</a>:</h4>
<p>causing a happy little stack overflow</p>



<a name="201634629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634629">(Jun 22 2020 at 17:16)</a>:</h4>
<p>right, I see. <code>N = ANON_CONST::&lt;N&gt;</code></p>



<a name="201634641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634641">(Jun 22 2020 at 17:16)</a>:</h4>
<p>where <code>ANON_CONST</code> doesn't use <code>N</code></p>



<a name="201634685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634685">(Jun 22 2020 at 17:17)</a>:</h4>
<p>that's funny. I think that's a bug in the inference cycle detection? (which I don't even think is working if you're seeing stack overflows)</p>



<a name="201634704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634704">(Jun 22 2020 at 17:17)</a>:</h4>
<p>pretty sure for types you get an error</p>



<a name="201634759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634759">(Jun 22 2020 at 17:17)</a>:</h4>
<p>It is, but the example should still compile...</p>



<a name="201634767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634767">(Jun 22 2020 at 17:17)</a>:</h4>
<p>you want to see this error <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=65e9f16b6945f605239d95b2bbd67140">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=65e9f16b6945f605239d95b2bbd67140</a></p>



<a name="201634812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634812">(Jun 22 2020 at 17:18)</a>:</h4>
<p>{ 6 + 1 } just really shouldn't rely on <code>N</code></p>



<a name="201634861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634861">(Jun 22 2020 at 17:18)</a>:</h4>
<p>only after you can reliably get an error instead of an ICE, you can change the behavior</p>



<a name="201634872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634872">(Jun 22 2020 at 17:18)</a>:</h4>
<p>but the naive semantics should result in an error like that</p>



<a name="201634913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634913">(Jun 22 2020 at 17:19)</a>:</h4>
<p>Then let me first implement the naive semantics <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="201634941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634941">(Jun 22 2020 at 17:19)</a>:</h4>
<p>I still believe we have to stop using the parent generics though</p>



<a name="201634946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634946">(Jun 22 2020 at 17:19)</a>:</h4>
<p>note that "infinite size" refers to the type being infinite in its definition, not <code>size_of</code> being infinite</p>



<a name="201634968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201634968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201634968">(Jun 22 2020 at 17:19)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> that would be a tragedy IMO since that's what we've been striving to do for years</p>



<a name="201635078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635078">(Jun 22 2020 at 17:20)</a>:</h4>
<p>~ <em>I write sins not tragedies</em> ~</p>



<a name="201635127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635127">(Jun 22 2020 at 17:20)</a>:</h4>
<p>anyway, somewhat curious how <span class="user-mention" data-user-id="116009">@nikomatsakis</span> feels about breaking an inference cycle of the form <code>$N = ANON_CONST::&lt;$N&gt;</code> by trying to evaluate <code>ANON_CONST</code> and hoping it doesn't depend on <code>$N</code></p>



<a name="201635331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635331">(Jun 22 2020 at 17:22)</a>:</h4>
<p>I think this stops working once an <code>ANON_CONST</code> depends on some (but not all) of its parents generic variables</p>



<a name="201635363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635363">(Jun 22 2020 at 17:22)</a>:</h4>
<p>So we can't eval it eagerly, because it's still polymorphic</p>



<a name="201635407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635407">(Jun 22 2020 at 17:23)</a>:</h4>
<p>but you can if what it depends on is specified</p>



<a name="201635437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635437">(Jun 22 2020 at 17:23)</a>:</h4>
<p>since you don't evaluate either fully polymorphically or fully concretely</p>



<a name="201635455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635455">(Jun 22 2020 at 17:23)</a>:</h4>
<p>you evaluate for some given substs</p>



<a name="201635622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635622">(Jun 22 2020 at 17:24)</a>:</h4>
<p>e.g. it could be <code>$N = ANON_CONST::&lt;1, 2, $N, 3&gt;</code> instead and the substs that miri would see would be <code>exists X. [1, 2, X, 3]</code> or similar</p>



<a name="201635663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635663">(Jun 22 2020 at 17:25)</a>:</h4>
<p>(via canonicalization)</p>



<a name="201635812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635812">(Jun 22 2020 at 17:26)</a>:</h4>
<p>My concern is <code>$N = ANON_CONST::&lt;1, $M, $N, 3&gt;</code>, where $M is also not yet inferred</p>



<a name="201635954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201635954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201635954">(Jun 22 2020 at 17:27)</a>:</h4>
<p>but wouldn't that imply that there is a cycle? if M is needed and uninferrable</p>



<a name="201636662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201636662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201636662">(Jun 22 2020 at 17:33)</a>:</h4>
<p>not sure, I don't fully grasp how <code>$N = ANON_CONST::&lt;..., $N, ...&gt;</code> can be handled so it might be fine</p>



<a name="201636929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201636929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201636929">(Jun 22 2020 at 17:35)</a>:</h4>
<blockquote>
<p>that's funny. I think that's a bug in the inference cycle detection? (which I don't even think is working if you're seeing stack overflows)</p>
</blockquote>
<p>I can go ahead and fix this first and then try to eagerly eval <code>ANON_CONST::&lt;N&gt;</code> and see if this fixes everything</p>



<a name="201785486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201785486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201785486">(Jun 23 2020 at 21:24)</a>:</h4>
<p><strong>BORN FROM THE ASHES</strong></p>
<p><a href="https://github.com/rust-lang/rust/pull/72351">https://github.com/rust-lang/rust/pull/72351</a></p>



<a name="201785530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201785530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201785530">(Jun 23 2020 at 21:25)</a>:</h4>
<p>I already had a fix for the inference cycle which I closed because I wasn't sure if this is the correct solution <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="201785562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/substs%20of%20Unevaluated%20consts/near/201785562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/substs.20of.20Unevaluated.20consts.html#201785562">(Jun 23 2020 at 21:25)</a>:</h4>
<p>not sure if you want to get pinged here <span class="user-mention" data-user-id="119009">@eddyb</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>